<div class="frame_introDiv">
	<form name="buyerContactForm" id="buyerContactForm" action="" method="post" >
	  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">
		<tr>
		  <td width="27%" class="ri-bbgg"> Coupons：</td>
		  <td width="73%" class="le">$<?=$this->memberArray[0]['my_coupon']?></td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> Virtual money：</td>
		  <td width="73%" class="le">
		  	<?=$this->memberArray[0]['virtual']?>&nbsp;&nbsp;&nbsp;<a href="adminb-recharge-index">I want to recharge</a>	  
		  </td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 
		  	Virtual currency exchange coupons
			<br />
			（<?=$this->virtual_exchange_rate?>virtual money exchange 1 $USD）
		  </td>
		  <td width="73%" class="le">
		  	I use <input type="text" value="" name="toCoupon" /> $USD virtual currency to exchange coupons <input type="button" value="Exchange" onclick="exchange('toCoupon');" />
		  </td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> 
		  	Virtual currency exchange coupons
			<br />
			（1$USD exchange <?=$this->virtual_exchange_rate?> virtual money）
		  </td>
		  <td width="73%" class="le">
		  	I use <input type="text" value="" name="toVirtual" /> coupons to exchange virtual currency <input type="button" value="Exchange" onclick="exchange('toVirtual');" />
		  </td>
		</tr>
		<tr>
		  <td width="27%" class="ri-bbgg"> Points：</td>
		  <td width="73%" class="le"><?=$this->memberArray[0]['integration']?></td>
		</tr>
	  </table>
	 </form>
</div>
<script>
function exchange(type){
	var virtual=$('input[name="'+type+'"]').val();
	if(!numTest(virtual)){
		alert("Please fill in correctly you want to exchange the number of virtual currency!");
	}else{
		$('#buyerContactForm').attr('action','adminb-virtual-exchange?type='+type);
		$('#buyerContactForm').submit();
	}
}
</script>